import { defineStore } from "pinia";
// import piniaPersistConfig from "../helper/persist";

export const useCountStore = defineStore({
  id: "count",
  state: () => ({
    total: 1,
    sum: 1,
    school: "理工",
    address: "重庆",
  }),
  getters: {
    addBig: (state):number => state.total * 10,
  },
  actions: {
    // add() {
    //   this.total += this.sum;
    // },

    sub(v) {
      this.total -= v;
    },
  },
  //   persist: piniaPersistConfig(`count`),
});
